Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Ceylon (programming language)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Ceylon_(programming_language)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Ceylon_programming_language rootpage-Ceylon_programming_language skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Ceylon (programming language)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */


.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}


/* end https://en.wikipedia.org/ */
</style><table class="infobox vevent"><tbody><tr><th colspan="2" class="infobox-above" style="background-color:#e0e0e0;">Ceylon</th></tr><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"></span></td></tr><tr><th scope="row" class="infobox-label"><a href="Programming_paradigm" title="Programming paradigm">Paradigm</a></th><td class="infobox-data"><a href="Object-oriented_programming" title="Object-oriented programming">Object-oriented</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_design" title="Software design">Designed&nbsp;by</a></th><td class="infobox-data">Gavin King</td></tr><tr><th scope="row" class="infobox-label"><a href="Software_developer" class="mw-redirect" title="Software developer">Developer</a></th><td class="infobox-data organiser"><a href="Eclipse_Foundation" title="Eclipse Foundation">Eclipse Foundation</a></td></tr><tr><th scope="row" class="infobox-label">First&nbsp;appeared</th><td class="infobox-data">2011<span style="display:none">&nbsp;(<span class="bday dtstart published updated">2011</span>)</span></td></tr><tr><td colspan="2" class="infobox-full-data"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;">1.3.3
/ August&nbsp;21, 2017<span style="display:none">&nbsp;(<span class="bday dtstart published updated">2017-08-21</span>)</span></div></td></tr><tr style="display:none"><td colspan="2">
</td></tr><tr><th scope="row" class="infobox-label"><a href="Type_system" title="Type system">Typing discipline</a></th><td class="infobox-data"><a href="Static_type_system" class="mw-redirect" title="Static type system">Static</a>, <a href="Strong_and_weak_typing" title="Strong and weak typing">strong</a>, <a href="Type_safety" title="Type safety">safe</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Computing_platform" title="Computing platform">Platform</a></th><td class="infobox-data"><a href="Java_virtual_machine" title="Java virtual machine">Java virtual machine</a>, <a href="JavaScript" title="JavaScript">JavaScript</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Software_license" title="Software license">License</a></th><td class="infobox-data"><a href="Apache_License_2.0" class="mw-redirect" title="Apache License 2.0">Apache License 2.0</a></td></tr><tr><th scope="row" class="infobox-label"><a href="Filename_extension" title="Filename extension">Filename extensions</a></th><td class="infobox-data">.ceylon<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></td></tr><tr><th scope="row" class="infobox-label">Website</th><td class="infobox-data"><span class="url"><a rel="nofollow" class="external text" href="http://ceylon-lang.org">ceylon-lang<wbr>.org</a></span></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #EEEEEE;">Influenced by</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="Java_(programming_language)" title="Java (programming language)">Java</a>,<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> <a href="Scala_(programming_language)" title="Scala (programming language)">Scala</a>, <a href="Smalltalk" title="Smalltalk">Smalltalk</a>, <a href="ML_(programming_language)" title="ML (programming language)">ML</a>,<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> <a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a>,<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> <a href="Whiley_(programming_language)" title="Whiley (programming language)">Whiley</a><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup></td></tr></tbody></table>
<p><b>Ceylon</b> was an <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented</a>, <a href="Strong_typing" class="mw-redirect" title="Strong typing">strongly</a> <a href="Type_system" title="Type system">statically typed</a> programming language with an emphasis on <a href="Immutable_object" title="Immutable object">immutability</a>, created by <a href="Red_Hat" title="Red Hat">Red Hat</a>. Ceylon programs run on the <a href="Java_virtual_machine" title="Java virtual machine">Java virtual machine</a> (JVM), and could be compiled to <a href="JavaScript" title="JavaScript">JavaScript</a>.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
The language design focuses on <a href="Computer_programming#Readability_of_source_code" title="Computer programming">source code readability</a>, <a href="Predictability#Predictability_in_human–computer_interaction" title="Predictability">predictability</a>, <a href="Programming_tool" title="Programming tool">toolability</a>, <a href="Modular_programming" title="Modular programming">modularity</a>, and <a href="Metaprogramming" title="Metaprogramming">metaprogrammability</a>.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p><p>Important features of Ceylon include:<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li>A type system enforcing <a href="Null_safety" class="mw-redirect" title="Null safety">null safety</a> and list element existence at compile time</li>
<li>Regular syntax and semantics, avoiding special cases and primitively-defined constructs in favor of <a href="Syntactic_sugar" title="Syntactic sugar">syntactic sugar</a></li>
<li>Support for generic programming and metaprogramming, with <a href="Reification_(computer_science)" title="Reification (computer science)">reified</a> <a href="Parametric_polymorphism" title="Parametric polymorphism">generics</a></li>
<li>Modularity built into the language, based on <a href="WildFly" title="WildFly">JBoss modules</a>, interoperable with <a href="OSGi" title="OSGi">OSGi</a><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> and <a href="Apache_Maven" title="Apache Maven">Maven</a><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup></li>
<li>powerful tools, including an Eclipse-based IDE<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup></li></ul>
<p>The name "Ceylon" is an oblique reference to Java, in that <a href="Java" title="Java">Java</a> and <a href="Sri_Lanka" title="Sri Lanka">Sri Lanka</a>, formerly known as Ceylon, are islands known for growth and export of <a href="Coffee" title="Coffee">coffee</a> and <a href="Tea" title="Tea">tea</a>.
</p><p>In August 2017, Ceylon was donated to the <a href="Eclipse_Foundation" title="Eclipse Foundation">Eclipse Foundation</a>. Development slowed down and finally stopped in 2020.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> In April 2023, <a href="Eclipse_Foundation" title="Eclipse Foundation">Eclipse Foundation</a> declared the termination of the transition.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Language_features">Language features</h2></div>
<p>Ceylon is heavily influenced by <a href="Java_(programming_language)" title="Java (programming language)">Java</a>'s syntax, but adds many new features.
</p>
<div class="mw-heading mw-heading3"><h3 id="Type_system">Type system</h3></div>
<p>One of the most novel aspects of Ceylon compared to Java is its <a href="Type_system" title="Type system">type system</a>. Ceylon foregoes Java's primitive types<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> and <a href="Object_type" class="mw-redirect" title="Object type">boxing</a> in favor of a type system composed entirely of first-class objects. While this may cause boxing overhead in some situations, it makes the type system more uniform.
</p><p>Ceylon allows for union and <a href="Intersection_type" title="Intersection type">intersection types</a>, in a similar fashion to <a href="TypeScript" title="TypeScript">TypeScript</a>, <a href="Whiley_(programming_language)" title="Whiley (programming language)">Whiley</a> and Flow, which in fact, took the idea from Ceylon.
</p><p>Union types, written <code>A|B</code>, allow a variable to have more than one type. The following example shows a Ceylon function which may take either an <a href="Integer_(computer_science)" title="Integer (computer science)">integer</a> or a <a href="String_(computer_science)" title="String (computer science)">string</a>:
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="nd">shared</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">integerOrString</span><span class="o">(</span><span class="n">Integer</span><span class="o">|</span><span class="n">String</span><span class="w"> </span><span class="n">input</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">(</span><span class="k">is</span><span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">input</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">print</span><span class="o">(</span><span class="s">"Got the integer ``input``"</span><span class="o">);</span>
<span class="w"> </span><span class="o">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">print</span><span class="o">(</span><span class="s">"Got the string '``input``'"</span><span class="o">);</span>
<span class="w"> </span><span class="o">}</span>
<span class="o">}</span>
</pre></div>
<p>Intersection types, written <code>A&amp;B</code>, are the theoretical foundation of <a href="Flow-sensitive_typing" title="Flow-sensitive typing">flow-sensitive typing</a>:
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="nd">shared</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">integerOrString</span><span class="o">(</span><span class="n">Integer</span><span class="o">|</span><span class="n">String</span><span class="w"> </span><span class="n">input</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">added</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">input</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">6</span><span class="o">;</span><span class="w"> </span><span class="c1">// illegal; the + operator is not defined on Integer|String</span>

<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">(</span><span class="k">is</span><span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">input</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">added</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">input</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">6</span><span class="o">;</span><span class="w"> </span><span class="c1">// legal; input is now known to be an Integer</span>
<span class="w"> </span><span class="n">print</span><span class="o">(</span><span class="s">"Got the integer ``input``"</span><span class="o">);</span>
<span class="w"> </span><span class="o">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">print</span><span class="o">(</span><span class="s">"Got the string '``input``'"</span><span class="o">);</span>
<span class="w"> </span><span class="o">}</span>
<span class="o">}</span>
</pre></div>
<p>The condition <code>is Integer input</code> narrows the type of <code>input</code> to <code>&lt;Integer|String&gt; &amp; Integer</code>,
which <a href="Distributive_property" title="Distributive property">distributes</a> to <code>Integer&amp;Integer | String&amp;Integer</code>,
which, as <code>String</code> and <code>Integer</code> are disjoint types, is equivalent to <code>Integer&amp;Integer | Nothing</code> (<code>Nothing</code> is the empty bottom type),
which simplifies to just <code>Integer</code>.
</p>
<div class="mw-heading mw-heading4"><h4 id="Null_safety">Null safety</h4></div>
<p>Union and intersection types are used to provide <a href="Null_safety" class="mw-redirect" title="Null safety">null safety</a>.
The top type of the Ceylon type hierarchy is the class <code>Anything</code>,
which has two subclasses: <code>Object</code>, the superclass of all normal classes and all interfaces, and <code>Null</code>, with the only instance <a href="Null_pointer" title="Null pointer"><code>null</code></a>.
Since <code>Object</code> and <code>Null</code> are disjoint types, most regular types like <code>Integer</code> or <code>List&lt;String&gt;</code> are not nullable;
a <a href="Nullable_type" title="Nullable type">nullable type</a> is the union <code>Integer|Null</code>, abbreviated <code>Integer?</code>.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</p><p>Intersection types can be used to get a non-optional type out of a possibly-optional type, such as a type parameter. For example, the signature of a function that removes <code>null</code> elements from a stream of values could be:
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="n">Iterable</span><span class="o">&lt;</span><span class="n">Element</span><span class="o">&amp;</span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">removeNulls</span><span class="o">&lt;</span><span class="n">Element</span><span class="o">&gt;(</span><span class="n">Iterable</span><span class="o">&lt;</span><span class="n">Element</span><span class="o">&gt;</span><span class="w"> </span><span class="n">stream</span><span class="o">);</span>
</pre></div>
<p>When <code>removeNulls</code> is called with a stream of <code>Integer|Null</code> elements, the result will be a stream of <code>&lt;Integer|Null&gt; &amp; Object</code> elements, which simplifies to <code>Integer</code>.
</p>
<div class="mw-heading mw-heading4"><h4 id="Functions">Functions</h4></div>
<p>Similarly to many modern languages, Ceylon supports <a href="First_class_function" class="mw-redirect" title="First class function">first class functions</a> and <a href="Higher_order_function" class="mw-redirect" title="Higher order function">higher order functions</a>, including function types and <a href="Anonymous_function" title="Anonymous function">anonymous functions</a><sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="c1">// A top-level higher-order function using block syntax (not associated with any user-created classes)</span>
<span class="n">String</span><span class="w"> </span><span class="nf">process</span><span class="o">(</span><span class="n">String</span><span class="w"> </span><span class="n">text</span><span class="o">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">transformString</span><span class="o">(</span><span class="n">String</span><span class="w"> </span><span class="n">toChange</span><span class="o">))</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nf">transformString</span><span class="o">(</span><span class="n">text</span><span class="o">);</span>
<span class="o">}</span>

<span class="c1">// A top-level function calling String.reverse in expression form.</span>
<span class="n">String</span><span class="w"> </span><span class="nf">reverse</span><span class="o">(</span><span class="n">String</span><span class="w"> </span><span class="n">text</span><span class="o">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">text</span><span class="o">.</span><span class="na">reversed</span><span class="o">;</span>

<span class="c1">// A function reference to String.reversed but mostly equivalent to the function above.</span>
<span class="n">String</span><span class="o">(</span><span class="n">String</span><span class="o">)</span><span class="w"> </span><span class="n">reverseFunctionReference</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">String</span><span class="o">.</span><span class="na">reversed</span><span class="o">;</span>

<span class="c1">// An example where the top-level function above is provided as an argument to the higher-order function above</span>
<span class="n">String</span><span class="w"> </span><span class="n">reversed1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">process</span><span class="o">(</span><span class="s">"one"</span><span class="o">,</span><span class="w"> </span><span class="n">reverse</span><span class="o">);</span>

<span class="c1">// An example where an anonymous function - (text) =&gt; text+text - is provided to the higher-order function above. </span>
<span class="n">String</span><span class="w"> </span><span class="n">reversed2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">process</span><span class="o">(</span><span class="s">"one"</span><span class="o">,</span><span class="w"> </span><span class="o">(</span><span class="n">text</span><span class="o">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">text</span><span class="o">+</span><span class="n">text</span><span class="o">);</span>
</pre></div>
<div class="mw-heading mw-heading4"><h4 id="Enumerated_types">Enumerated types</h4></div>
<p>Similar to Java and many other languages, and with a similar mechanism as <a href="Algebraic_data_type" title="Algebraic data type">algebraic types</a>, Ceylon supports <a href="Enumerated_type" title="Enumerated type">enumerated types</a>, otherwise known as enums. This is implemented in Ceylon with a pattern of limiting the instances of an abstract class at declaration to a limited set of objects (in this case, singleton instances). Another way to implement this pattern is with the new constructor feature in Ceylon 1.2 where the objects are implemented as different named constructor declarations.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="c1">// Traditional syntax for enumerated type, in this case, limiting the instances to three objects(for this purpose: Singletons)</span>
<span class="nd">abstract</span><span class="w"> </span><span class="kd">class</span><span class="w"> </span><span class="nf">Vehicle</span><span class="o">(</span><span class="nd">shared</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">name</span><span class="o">)</span><span class="w"> </span><span class="kd">of</span><span class="w"> </span><span class="n">plane</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">train</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">automobile</span><span class="w"> </span><span class="o">{}</span>

<span class="kd">object</span><span class="w"> </span><span class="nc">plane</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="nf">Vehicle</span><span class="o">(</span><span class="s">"plane"</span><span class="o">)</span><span class="w"> </span><span class="o">{}</span>
<span class="kd">object</span><span class="w"> </span><span class="nc">train</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="nf">Vehicle</span><span class="o">(</span><span class="s">"train"</span><span class="o">)</span><span class="w"> </span><span class="o">{}</span>
<span class="kd">object</span><span class="w"> </span><span class="nc">automobile</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="nf">Vehicle</span><span class="o">(</span><span class="s">"automobile"</span><span class="o">)</span><span class="w"> </span><span class="o">{}</span>
<span class="c1">// Compile error: type is not a subtype of any case of enumerated supertype: 'boat' inherits 'Vehicle'</span>
<span class="c1">//object boat extends Vehicle("boat") {}</span>

<span class="c1">// New (as of Ceylon 1.2.0) constructor-based syntax</span>
<span class="kd">class</span><span class="w"> </span><span class="nc">Vehicle</span><span class="w"> </span><span class="kd">of</span><span class="w"> </span><span class="n">plane</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">train</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">automobile</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">name</span><span class="o">;</span>

<span class="w"> </span><span class="nd">abstract</span><span class="w"> </span><span class="kt">new</span><span class="w"> </span><span class="nf">named</span><span class="o">(</span><span class="n">String</span><span class="w"> </span><span class="n">pName</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pName</span><span class="o">;</span>
<span class="w"> </span><span class="o">}</span>

<span class="w"> </span><span class="nd">shared</span><span class="w"> </span><span class="kt">new</span><span class="w"> </span><span class="n">plane</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="nf">named</span><span class="o">(</span><span class="s">"plane"</span><span class="o">)</span><span class="w"> </span><span class="o">{}</span>
<span class="w"> </span><span class="nd">shared</span><span class="w"> </span><span class="kt">new</span><span class="w"> </span><span class="n">train</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="nf">named</span><span class="o">(</span><span class="s">"train"</span><span class="o">)</span><span class="w"> </span><span class="o">{}</span>
<span class="w"> </span><span class="nd">shared</span><span class="w"> </span><span class="kt">new</span><span class="w"> </span><span class="n">automobile</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="nf">named</span><span class="o">(</span><span class="s">"automobile"</span><span class="o">)</span><span class="w"> </span><span class="o">{}</span>
<span class="w"> </span><span class="c1">// Compile error: value constructor does not occur in of clause of non-abstract enumerated class: 'boat' is not listed in the of clause of 'Vehicle'</span>
<span class="w"> </span><span class="c1">//shared new boat extends named("boat") {}</span>
<span class="o">}</span>
</pre></div>
<div class="mw-heading mw-heading4"><h4 id="Type_inference">Type inference</h4></div>
<p>Ceylon is strongly and statically typed, but also has support for <a href="Type_inference" title="Type inference">type inference</a>.
The <code>value</code> keyword is used to infer the type of a variable,
and the <code>function</code> keyword is used to infer the type of a function.
The following two definition pairs are each equivalent:
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="n">Integer</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="o">;</span>
<span class="kt">value</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="o">;</span>

<span class="n">Integer</span><span class="w"> </span><span class="nf">add</span><span class="o">(</span><span class="n">Integer</span><span class="w"> </span><span class="n">i1</span><span class="o">,</span><span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">i2</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">i1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">i2</span><span class="o">;</span>
<span class="o">}</span>
<span class="kt">function</span><span class="w"> </span><span class="nf">add</span><span class="o">(</span><span class="n">Integer</span><span class="w"> </span><span class="n">i1</span><span class="o">,</span><span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">i2</span><span class="o">)</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">i1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">i2</span><span class="o">;</span>
<span class="o">}</span>
</pre></div>
<p>However, to make single-pass type inference possible, type inference is only allowed for non-toplevel and unshared declarations.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Entry_point_with_names">Entry point with names</h3></div>
<p>By default the starter (<code>ceylon run</code>) runs the shared run() function of a module:
</p>
<div class="mw-highlight mw-highlight-lang-ceylon mw-content-ltr" dir="ltr"><pre><span class="cm">/* The classic Hello World program */</span>
<span class="nd">shared</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">run</span><span class="o">()</span><span class="w"> </span><span class="o">{</span>
<span class="w"> </span><span class="n">print</span><span class="o">(</span><span class="s">"Hello, World!"</span><span class="o">);</span>
<span class="o">}</span>
</pre></div>
<p>but any other shared function without parameters can be used as main calling the program with the <i>run</i> parameter, like this:
</p><p><code>ceylon run --compile=force --run hello default</code>
</p>
<div class="mw-heading mw-heading2"><h2 id="Versions">Versions</h2></div>
<p>Versions of Ceylon released:<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li>M1 0.1 "Newton" (Dec 20 2011)</li>
<li>M2 0.2 "Minitel" (Mar 2 2012)</li>
<li>M3 0.3 "V2000" (Jun 21 2012)</li>
<li>M3.1 0.3.1 "V2000" (Jul 6 2012)</li>
<li>M4 0.4 "Analytical Engine" (Oct 29 2012)</li>
<li>M5 0.5 "Nesa Pong" (Mar 13 2013)</li>
<li>M6 0.6 "Virtual Boy" (Sep 23 2013)</li>
<li>1.0 beta "Virtual Boy" (Sep 24 2013)</li>
<li>1.0.0 "No More Mr Nice Guy" (Nov 13 2013)</li>
<li>1.1.0 "Ultimate Ship The Second" (Oct 09 2014)</li>
<li>1.2.0 "A Series of Unlikely Explanations" (Oct 28 2015)</li>
<li>1.2.1 "Irregular Apocalypse" (Feb 11 2016)</li>
<li>1.2.2 "Charming But Irrational" (Mar 11 2016)</li>
<li>1.3.0 "Total Internal Reflection" (Sep 19 2016)</li>
<li>1.3.1 "Now We Try It My Way" (Nov 22 2016)</li>
<li>1.3.2 "Smile Tolerantly" (Mar 02 2017)</li>
<li>1.3.3 "Contents May Differ" (Aug 21 2017)</li></ul>
<div class="mw-heading mw-heading2"><h2 id="License">License</h2></div>
<p>All parts of Ceylon are available as <a href="Free_software" title="Free software">free software</a>, mostly the <a href="Apache_License" title="Apache License">Apache License</a>.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> Part of the source code is licensed under LGPL.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1266661725">
/* start https://en.wikipedia.org/ */


.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}


/* end https://en.wikipedia.org/ */
</style>
<ul><li><a href="Dart_(programming_language)" title="Dart (programming language)">Dart (programming language)</a>, has its own VM, compiles to JS, type system not very strict, supports <a href="Mixin" title="Mixin">mixins</a></li>
<li><a href="Fantom_(programming_language)" title="Fantom (programming language)">Fantom (programming language)</a>, compiles to JVM, type system not very strict, supports <a href="Mixin" title="Mixin">mixins</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width reflist-columns-2">
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFKing" class="citation web cs1">King, Gavin. <a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/spec/html_single/#compilationunitstructure">"The Ceylon Language: §4.1 Compilation unit structure"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>. <q>A <i>compilation unit</i> is a text file, with the filename extension <code>.ceylon</code>.</q></cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/faq/#what_is_ceylon">"Frequently Asked Questions: What is Ceylon?"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>. <q>Ceylon is a new programming language that's deeply influenced by Java</q></cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://gitter.im/ceylon/user?at=5660a7242cbea1d7054de9d9">"ceylon/user - Gitter"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://gitter.im/ceylon/user?at=5660a90e5057376520db6f8b">"ceylon/user - Gitter"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://jaxenter.com/top-10-ceylon-language-features-java-wishes-it-had-108003.html">"Top 10 Ceylon language features Java wishes it had"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2019-11-29</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ceylon-lang.org/blog/2013/09/22/ceylon-1/">"Ceylon 1.0 beta"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2013-09-26</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.theregister.co.uk/2011/04/13/red_hat_unveils_project_ceylon">"Project Ceylon – Red Hat builds Java replacement"</a>. <a href="The_Register" title="The Register">The Register</a>. 2011-04-13<span class="reference-accessdate">. Retrieved <span class="nowrap">2011-11-27</span></span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFKing2012" class="citation web cs1">King, Gavin (2012-01-10). <a rel="nofollow" class="external text" href="http://ceylon-lang.org/blog/2012/01/10/goals/">"Principles that guide this project"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/faq/language-design/#goals">"FAQ about language design: Goals"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite id="CITEREFFestal2014" class="citation web cs1">Festal, David (2014-10-10). <a rel="nofollow" class="external text" href="http://ceylon-lang.org/blog/2014/10/10/ceylon-osgi-jee/">"Write in Ceylon, deploy as OSGI, use in Java EE"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/reference/repository/maven/#maven_repositories">"Maven repositories"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/ide/features/">"Features of Ceylon IDE"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/eclipse-archived/ceylon">"ceylon / ceylon"</a>. GitHub, Inc. 2020-05-25. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20231003075404/https://github.com/eclipse-archived/ceylon">Archived</a> from the original on 2023-10-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2024-01-22</span></span>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review">"Eclipse Ceylon™ Termination Review"</a>. Eclipse Foundation. 2023-04-05. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20230423134055/https://projects.eclipse.org/projects/technology.ceylon/reviews/termination-review">Archived</a> from the original on 2023-04-23<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-04-23</span></span>.</cite></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite id="CITEREFKing" class="citation web cs1">King, Gavin. <a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/faq/language-design/">"Ceylon: Language Design FAQ"</a>.</cite></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite id="CITEREFKing" class="citation web cs1">King, Gavin. <a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/spec/html_single/#compiletimesafety">"The Ceylon Language: §1.4.3 Compile-time safety for null values and flow-sensitive typing"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite id="CITEREFKing" class="citation web cs1">King, Gavin. <a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#functions">"The Ceylon Language: 4.7 Functions"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">5 December</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite id="CITEREFKing" class="citation web cs1">King, Gavin. <a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/spec/html/declarations.html#classeswithcases">"The Ceylon Language: 4.5.8 Enumerated classes"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">6 December</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite id="CITEREFKing" class="citation web cs1">King, Gavin. <a rel="nofollow" class="external text" href="http://ceylon-lang.org/documentation/1.2/spec/html_single/#typeinference">"The Ceylon Language: §3.2.9 Type inference"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://ceylon-lang.org/download-archive/">https://ceylon-lang.org/download-archive/</a> Ceylon: Download Previous Ceylon versions</span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://ceylon-lang.org/code/licenses">"Ceylon: Licenses"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-12-04</span></span>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><span class="official-website"><span class="url"><a rel="nofollow" class="external text" href="https://ceylon-lang.org/">Official website</a></span></span> </li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Programming_languages625" style="padding:3px"><table class="nowraplinks hlist mw-collapsible expanded navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div id="Programming_languages625" style="font-size:114%;margin:0 4em"><a href="Programming_language" title="Programming language">Programming languages</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="Comparison_of_programming_languages" title="Comparison of programming languages">Comparison</a></li>
<li><a href="Timeline_of_programming_languages" title="Timeline of programming languages">Timeline</a></li>
<li><a href="History_of_programming_languages" title="History of programming languages">History</a></li></ul>
</div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a></li>
<li><a href="ALGOL" title="ALGOL">ALGOL</a>
<ul><li><a href="Simula" title="Simula">Simula</a></li></ul></li>
<li><a href="APL_(programming_language)" title="APL (programming language)">APL</a></li>
<li><a href="Assembly_language" title="Assembly language">Assembly</a></li>
<li><a href="BASIC" title="BASIC">BASIC</a>
<ul><li><a href="Visual_Basic" title="Visual Basic">Visual Basic</a>
<ul><li><a href="Visual_Basic_(classic)" title="Visual Basic (classic)">classic</a></li>
<li><a href="Visual_Basic_(.NET)" title="Visual Basic (.NET)">.NET</a></li></ul></li></ul></li>
<li><a href="C_(programming_language)" title="C (programming language)">C</a></li>
<li><a href="C%2B%2B" title="C++">C++</a></li>
<li><a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a></li>
<li><a href="COBOL" title="COBOL">COBOL</a></li>
<li><a href="Erlang_(programming_language)" title="Erlang (programming language)">Erlang</a>
<ul><li><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a></li></ul></li>
<li><a href="Forth_(programming_language)" title="Forth (programming language)">Forth</a></li>
<li><a href="Fortran" title="Fortran">Fortran</a></li>
<li><a href="Go_(programming_language)" title="Go (programming language)">Go</a></li>
<li><a href="Haskell" title="Haskell">Haskell</a></li>
<li><a href="Java_(programming_language)" title="Java (programming language)">Java</a></li>
<li><a href="JavaScript" title="JavaScript">JavaScript</a></li>
<li><a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a></li>
<li><a href="Kotlin_(programming_language)" title="Kotlin (programming language)">Kotlin</a></li>
<li><a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a></li>
<li><a href="Lua" title="Lua">Lua</a></li>
<li><a href="MATLAB" title="MATLAB">MATLAB</a></li>
<li><a href="ML_(programming_language)" title="ML (programming language)">ML</a>
<ul><li><a href="Caml" title="Caml">Caml </a>
<ul><li><a href="OCaml" title="OCaml">OCaml</a></li></ul></li></ul></li>
<li><a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>
<ul><li><a href="Object_Pascal" title="Object Pascal">Object Pascal</a></li></ul></li>
<li><a href="Perl" title="Perl">Perl </a>
<ul><li><a href="Raku_(programming_language)" title="Raku (programming language)">Raku</a></li></ul></li>
<li><a href="PHP" title="PHP">PHP</a></li>
<li><a href="Prolog" title="Prolog">Prolog</a></li>
<li><a href="Python_(programming_language)" title="Python (programming language)">Python</a></li>
<li><a href="R_(programming_language)" title="R (programming language)">R</a></li>
<li><a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a></li>
<li><a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a></li>
<li><a href="SAS_language" title="SAS language">SAS</a></li>
<li><a href="SQL" title="SQL">SQL</a></li>
<li><a href="Scratch_(programming_language)" title="Scratch (programming language)">Scratch</a></li>
<li><a href="Shell_script" title="Shell script">Shell</a></li>
<li><a href="Smalltalk" title="Smalltalk">Smalltalk</a></li>
<li><a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a></li>
<li><i><a href="List_of_programming_languages" title="List of programming languages">more...</a></i></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="List-Class article"></span></span> <b>Lists:</b> <a href="List_of_programming_languages" title="List of programming languages">Alphabetical</a></li>
<li><a href="List_of_programming_languages_by_type" title="List of programming languages by type">Categorical</a></li>
<li><a href="Generational_list_of_programming_languages" title="Generational list of programming languages">Generational</a></li>
<li><a href="Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li>
<li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Category</li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2024-11-07" href="https://en.wikipedia.org/wiki/?title=Ceylon_(programming_language)&amp;oldid=1255949649">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>